<template>
    <div>
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item v-for="item in swiperImg" :key="item.id">
                <img :src="item.picUrl" alt />
            </van-swipe-item>
        </van-swipe>
    </div>
</template>

<script>
export default {
    data() {
        return {
            swiperImg: [],
        };
    },
    methods: {},
    mounted() {
        this.$API.getBanner().then((res) => {
            // console.log(res.data.data);
            this.swiperImg = res.data.data;
        });
    },
};
</script>
<style lang="scss">
.my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 120px;
    height: 50vh!important;
    text-align: center;
    img{
        width: 100%;
        height: 100%;
    }
    // background-color: #39a9ed;
}
</style>